post/drivers/i2c.c: fix compile error
authorWolfgang Denk <[email protected]>
Tue, 26 Oct 2010 21:22:36 +0000 (23:22 +0200)
committerWolfgang Denk <[email protected]>
Wed, 27 Oct 2010 18:09:59 +0000 (20:09 +0200)
Commit 7e263ce "post/i2c: Clean up detection logic" added a "const"
qualifier to the declaration of i2c_addr_list[], missing the fact that
the list gets modified later in the code, which results in build
errors like these:

i2c.c: In function 'i2c_post_test':
i2c.c:88: error: assignment of read-only location

Remove the incorrect "const".

Signed-off-by: Wolfgang Denk <[email protected]>
Cc: Peter Tyser <[email protected]>
Cc: Heiko Schocher <[email protected]>
Acked-by: Heiko Schocher <[email protected]>
post/drivers/i2c.c

index 3080e81b5bf38434946285d54df62bdf58c12ee2..4a1b1a49d17bd481e401070ad44b78d69779638b 100644 (file)
@@ -74,7 +74,7 @@ int i2c_post_test (int flags)
 #else
        unsigned int ret  = 0;
        int j;
-       const unsigned char i2c_addr_list[] = CONFIG_SYS_POST_I2C_ADDRS;
+       unsigned char i2c_addr_list[] = CONFIG_SYS_POST_I2C_ADDRS;
 
        /* Start at address 1, address 0 is the general call address */
        for (i = 1; i < 128; i++) {